<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>


        // isPrototypeOf()  判断是不是实例的原型对象(包含祖先)

        function Dog(name, age) {
            this.name = name;
            this.age = age;
            this.fn = function () { }
        }

        Dog.prototype.type = '狗子';
        Dog.prototype.say = function () {
            console.log('wang');
        }


        const d = new Dog('哈士奇', 3);


        // 
        console.log(Dog.prototype.isPrototypeOf(d));


        const arr = [];

        console.log(Array.prototype.isPrototypeOf(arr));

    </script>

</body>

</html>